package com.fauks.ssm.springmvc.xml;

import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 可以处理多个方法
 */
public class _03MultiController {

    public ModelAndView first(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("message", "我是第一个方法");
        modelAndView.setViewName("first");
        return modelAndView;
    }

    public ModelAndView second(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("message", "我是第二个方法");
        modelAndView.setViewName("second");
        return modelAndView;
    }
}
